# -*- coding: utf-8 -*-
# @Time    : 2020/4/8 8:49
# @Author  : Weymouth
# @Email   : 261229090@qq.com
# @File    : 分页.py
# @Software: PyCharm
# ---------------------------------------------------

"""
class Pergination:

    def __init__(self, current_page):
        try:
            #qwe，传入时会转换成1，不会直接报错
            p = int(current_page)
        except Exception as e:
            p = 1
        self.page = p

    @property
    def start(self):
        val = (self.page - 1) * 10
        return val

    @property
    def end(self):
        val = self.page * 10
        return val

li = []
for i in range(1000):
    li.append(i)

while True:
    p = input("请输出要查看的页码：")
    obj = Pergination(p)
    # #1, 0,  10
    # #2, 10, 20
    # #3, 20, 30
    # start = (p-1) * 10
    # end = p * 10
    print(li[obj.start:obj.end])
"""

